package com.example.designpatterns.state;

/**
 * CancelledState类 - 已取消状态
 * 
 * 实现与已取消状态相关的行为
 */
public class CancelledState implements State {
    @Override
    public void pay(Context context) {
        System.out.println("订单 " + context.getOrderNumber() + " 已取消，无法支付");
    }
    
    @Override
    public void ship(Context context) {
        System.out.println("订单 " + context.getOrderNumber() + " 已取消，无法发货");
    }
    
    @Override
    public void receive(Context context) {
        System.out.println("订单 " + context.getOrderNumber() + " 已取消，无法确认收货");
    }
    
    @Override
    public void refund(Context context) {
        System.out.println("订单 " + context.getOrderNumber() + " 已取消，无需退款");
    }
    
    @Override
    public void cancel(Context context) {
        System.out.println("订单 " + context.getOrderNumber() + " 已经取消，请勿重复操作");
    }
    
    @Override
    public String getDescription() {
        return "已取消";
    }
} 